package control;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;

import view.BookDetailJPanel;
import view.LibraryMainJFrame;

import component.Icons;

@SuppressWarnings("serial")
public class NewBookAction extends AbstractAction {
	private LibraryMainJFrame mainFrame;
	
	public NewBookAction(LibraryMainJFrame frame) {
		super("Neues Buch", Icons.BOOK_ADD);
		putValue(MNEMONIC_KEY, KeyEvent.VK_N);
		mainFrame = frame;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		mainFrame.openContentPanel(new BookDetailJPanel(mainFrame));
	}

}
